import { defHttp } from '/@/utils/http/axios';
import { ApiCommon } from '../common';

const { CUSTOMER_ADMIN_API } = ApiCommon;

enum API {
  REFUND_DEPOSIT_CREATE = '/refund-deposit/create', // 预存款退费申请
  WALLET_TRADE_DETAIL_LIST = '/wallet-trade-detail/getPageByUserId', // 预存款退费申请列表
  REFUND_DEPOSIT_LIST = '/refund-deposit/page', // 预存款退费销账列表
  REFUND_DEPOSIT_BYID = '/refund-deposit/get', // 查询单个退款详情
  REFUND_DEPOSIT_UPDATE = '/refund-deposit/update', // 预存款销账
  REFUND_DEPOSIT_APPROVAL = '/refund-deposit/approval/get', // 云存款详情
}

export const createRefundDepositApi = (data: any) =>
  defHttp.post({ url: CUSTOMER_ADMIN_API + API.REFUND_DEPOSIT_CREATE, data })

export const getWlletTradeDetailListApi = (data: any) =>
  defHttp.post({ url: CUSTOMER_ADMIN_API + API.WALLET_TRADE_DETAIL_LIST, data })

export const getRefundDepositListApi = (data: any) =>
  defHttp.post({ url: CUSTOMER_ADMIN_API + API.REFUND_DEPOSIT_LIST, data })  

export const getRefundDepositByidApi = (params: any) =>
  defHttp.get({ url: CUSTOMER_ADMIN_API + API.REFUND_DEPOSIT_BYID, params })  

export const updateRefundDepositApi = (data: any) =>
  defHttp.put({ url: CUSTOMER_ADMIN_API + API.REFUND_DEPOSIT_UPDATE, data })  

export const getRefundDepositApprovalApi = (params: any) =>
  defHttp.get({ url: CUSTOMER_ADMIN_API + API.REFUND_DEPOSIT_APPROVAL, params })  
